package com.sz.youban.dt.entity.credit;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 聚信立个人报告
 * </p>
 *
 * @author ruichar
 * @since 2017-06-27
 */
@TableName("dt_credit_jxl")
public class DtCreditJxl extends Model<DtCreditJxl> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 父id
     */
	@TableField("parent_id")
	private Integer parentId;
    /**
     * 根id
     */
	@TableField("root_id")
	private Integer rootId;
	private String key;
    /**
     * 若信息量过大存入big_value
     */
	private String value;
    /**
     * 大量文本信息存储
     */
	@TableField("big_value")
	private String bigValue;
    /**
     * 描述
     */
	private String desc;
    /**
     * 时间戳
     */
	private Date tsp;

	private DtCreditJxl(Builder builder) {
		this.id = builder.id;
		this.parentId = builder.parentId;
		this.rootId = builder.rootId;
		this.key = builder.key;
		this.value = builder.value;
		this.bigValue = builder.bigValue;
		this.desc = builder.desc;
		this.tsp = builder.tsp;
	}

	public static Builder newDtCreditJxl() {
		return new Builder();
	}

	public static final class Builder {
		private Integer id;
		private Integer parentId;
		private Integer rootId;
		private String key;
		private String value;
		private String bigValue;
		private String desc;
		private Date tsp;

		public Builder() {
		}

		public DtCreditJxl build() {
			return new DtCreditJxl(this);
		}

		public Builder id(Integer id) {
			this.id = id;
			return this;
		}

		public Builder parentId(Integer parentId) {
			this.parentId = parentId;
			return this;
		}

		public Builder rootId(Integer rootId) {
			this.rootId = rootId;
			return this;
		}

		public Builder key(String key) {
			this.key = key;
			return this;
		}

		public Builder value(String value) {
			this.value = value;
			return this;
		}

		public Builder bigValue(String bigValue) {
			this.bigValue = bigValue;
			return this;
		}

		public Builder desc(String desc) {
			this.desc = desc;
			return this;
		}

		public Builder tsp(Date tsp) {
			this.tsp = tsp;
			return this;
		}
	}

	public Integer getId() {
		return id;
	}

	public Integer getParentId() {
		return parentId;
	}

	public Integer getRootId() {
		return rootId;
	}

	public String getKey() {
		return key;
	}

	public String getValue() {
		return value;
	}

	public String getBigValue() {
		return bigValue;
	}

	public String getDesc() {
		return desc;
	}

	public Date getTsp() {
		return tsp;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "DtCreditJxl{" +
				"id=" + id +
				", parentId=" + parentId +
				", rootId=" + rootId +
				", key='" + key + '\'' +
				", value='" + value + '\'' +
				", bigValue='" + bigValue + '\'' +
				", desc='" + desc + '\'' +
				", tsp=" + tsp +
				'}';
	}
}
